package com.zzxx.mapper;
import com.zzxx.pojo.Product;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ProductMapper {
    @Select("select * from product where id = #{id}")
    Product findById(String id);

    @Select("select * from product")
    List<Product> queryAll();

    @Update("delete from product where id = #{id}")
    void deleteById(String id);

    @Update("insert into product values(#{id},#{productNum},#{productName},#{cityName},#{departureTime},#{productPrice},#{productDesc},#{productStatus})")
    void addProduct(Product product);
}
